// import cFoot from "../enterprise_wechat/myComponents/foot";
import userInfo from "../enterprise_wechat/myComponents/memberInfo";
import myCustomer from "../enterprise_wechat/myComponents/my_customer";
import orderList from "../enterprise_wechat/myComponents/orderList";
import revenueDetails from "../enterprise_wechat/myComponents/revenueDetails";
import myCart from "../enterprise_wechat/myComponents/myCart";
import goodsCoupon from '../enterprise_wechat/myComponents/goodsCoupon';
import myFavorite from '../enterprise_wechat/myComponents/myFavorite';
import browseRecord from '../enterprise_wechat/myComponents/browseRecord';
import labelPop from '../enterprise_wechat/myComponents/labelPop';
import addLabelPop from '../enterprise_wechat/myComponents/addLabelPop';
import cultivateCourse from "../enterprise_wechat/myComponents/cultivateCourse"
import carManage from "./myComponents/carManage";
import BScroll from "better-scroll";
import { scrollMixin } from "../../utils/mixin";
import { Toast } from 'vant';


export default {
  mixins: [scrollMixin], //加载更多
  data () {
    return {
      agentData: { // 企业微信config接口配置
        agent_secret: "",
        agentid: "",
        corpid: ""
      },
      need_bind:false,
      userId:"",
      testUserId: 'wmDesSDgAAnVOxcNIw8XQ6x1qhN5ZidA', // dev15 测试userId
      userDataUrl: "plugin.wechat-chat-sidebar.frontend.controller.customer.customer.index",
      getConfig: {client: 'work',type: 17}, //企业微信公共参数

      memberInfo: {}, // 会员信息
      income_statistic: [], // 收入信息
      tags: [], // 标签列表
      actions: [], // 企业标签
      navActive: 0,
      addTagText: '',
      showAddTagPop: false,
      showAddSheet: false,
      income_statistic_type: "0",

      tabList: ['会员详情', 'Ta的客户', '订单列表', '收入详情', 'Ta的购物车', '优惠券', '商品收藏', '浏览足迹'],
      showChild: false,
      bindCunstomerUidPop: false,//绑定外部联系人弹窗
      bindCunstomerUid_vaule: '',
      bindCunstomerUid_list: [],
      activeUidInfo: {},
      chatId: 0,
      cropId:'',
      member_id:'',
      //标签优化
      makeTagPop:false,
      addTagPop:false,
      groupList:[],
      total_page: 0,
      query: { //标签参数
        group_id:'',
        group_name:'',
        page: 1,
      },
      //标签组
      
      timer:null,
      storeScroll: "",
      classifyScroll: "",
      addTagScroll:'',
      debounce_timer:null,
      classifyTimer:null,
      addtag_timer:null,
      tagPage:1,
      tagTotal_page:0,
      labelObj:{
        tagIsLoadMore:false,
        finished:false,
        mainFinished:false,
        isLoadMore: false,
      },
      //优化标签显示
      tagsMore:false,
      tagsClass:false,

      member_current_page:1,
      member_last_page:1,
      scroll_is_load_more:true,
    };
  },
  computed: {
    componentName() {
      switch (this.navActive) {
        case 1:
          return "myCustomer";
        case 2:
          return "orderList";
        case 3:
          return "revenueDetails";
        case 4:
          return "myCart";
        case 5:
          return "goodsCoupon";
        case 6:
          return "myFavorite";
        case 7:
          return "browseRecord";
        case 8:
          if (this.tabList[this.navActive] == "车辆管理") {
            return "carManage";
          }
          return "cultivateCourse";
      }
    }
  },
  created() {
    // 需要在 调用getAgentConfig之前设置 appjsApiList,appSignSuccess,appSignError
    
  },
  activated () {
    this.tabList = ['会员详情', 'Ta的客户', '订单列表', '收入详情', 'Ta的购物车', '优惠券', '商品收藏', '浏览足迹']; //初始化底部导航
    if (this.fun.getKey("crop_id")) {
      let corp_id = this.fun.getKey("crop_id");
      window.localStorage.setItem("crop_id", corp_id);
      this.cropId = corp_id;
    } else {
      console.log(window.localStorage.getItem("crop_id"));
      this.cropId = window.localStorage.getItem("crop_id") || '0';
    }
    this.initData();
    this.getAgentConfig();
    
    // if (this.fun.getTyep() === "17") {
    //   this.getAgentConfig();
    // } else {
    //   // // 本地测试 start
    //   this.getCustomerInfo(this.testUserId);
    //   // // 本地测试 end
    // }
  },
  
  methods: {
    initData() {
      this.memberInfo = {};
      this.member_current_page = 1;
      this.member_last_page = 1;
      this.scroll_is_load_more = true;
      this.tagsMore = false;
    },
    // 企业微信配置信息
    getAgentConfig() {
      $http
        .get(
          "plugin.wechat-chat-sidebar.frontend.controller.index.get-config",
          {crop_id:this.cropId,url: this.fun.isIosOrAndroid() === "ios" ? window.initUrl : document.location.href},
          "loading"
        )
        .then(response => {
          if (response.result === 1) {
            this.agentData = response.data;
            let get_token = response.data.get_token;
            let config = {
              debug: false,
              beta: true,
              jsApiList: ["agentConfig"],
              openTagList: ["ww-open-data"],
              appId: this.agentData.corpid,
              nonceStr: get_token.noncestr,
              timestamp: get_token.timestamp,
              signature: get_token.token
            };
            console.log("wx.config ==== start");
            wx.config(config);
            wx.ready(() => {
              console.log("wx.ready ==== start");
              setTimeout(() => {
                this.getAgentSign(config, get_token.app_token);
              }, 500);
            });
            wx.error(res => {
              console.log("getAgentConfig：：config信息验证失败！" + JSON.stringify(res));
            });
          } else {
            this.$toast(response.msg);
          }
        })
        .catch(error => {
          console.log("getAgentConfig::", error);
        });
    },
    // 企业微信登录
    getAgentSign(config, app_token) {

      wx.agentConfig({
        debug: false,
        corpid: config.appId,
        agentid: this.agentData.agentid,
        timestamp: config.timestamp,
        nonceStr: config.nonceStr,
        signature: app_token,
        jsApiList: ["getCurExternalContact",'getContext','getCurExternalChat'],
        success: () => {
          wx.invoke('getContext', {}, (res)=>{
            if(res.err_msg == "getContext:ok"){
                let entry  = res.entry ; //返回进入H5页面的入口类型，目前有normal、contact_profile、single_chat_tools、group_chat_tools、chat_attachment
                console.log("=========获取进入H5页面的入口环境 ====: ",entry);
                if(entry == 'group_chat_tools'){
                  this.contactsUid();//获取群绑定的外部联系人的会员ID,若为空则表示没有绑定外部联系人
                } else {
                  wx.invoke("getCurExternalContact", {}, res => {
                    console.log("getCurExternalContact:::", res);
                    if (res.err_msg == "getCurExternalContact:ok") {
                      // console.log("getCurExternalContact:ok ::::::::::::::", res.userId);
                      window.localStorage.setItem("member_id", "");
                      this.getCustomerInfo(res.userId); //返回当前外部联系人userId
                    } else {
                      //错误处理
                      this.errorLogHandler("getCurExternalContact", res);
                      this.$toast("获取当前外部联系人失败！");
                    }
                  });
                  
                }
              }else {
                //错误处理
                console.log('wx.getContext err::',res);
              }
          });
        },
        fail: res => {
          console.log('wx.agentConfig::res',res);
          this.errorLogHandler("wx.agentConfig", res);
          this.$toast("您没有查看权限，请联系管理员！");
        }
      });
    },
    contactsUid(){
      wx.invoke('getCurExternalChat', {}, (res)=>{
        if(res.err_msg == "getCurExternalChat:ok"){
          this.chatId  = res.chatId ; //返回当前外部群的群聊ID
          $http.get("plugin.wechat-chat-sidebar.frontend.controller.index.get-group-external-contacts", { chat_id: this.chatId, }, "获取联系人...").then(response => {
            if (response.result === 1) {
              if(response.data.external_contacts_uid){
                this.memberId = response.data.external_contacts_uid;
                window.localStorage.setItem("member_id", this.memberId);
                this.getUserData();
                this.getTagData(this.query);
                this.getTagGroup(); //标签组
                return;
              }
              // return this.getCustomerInfo(response.data.external_contacts_uid); //返回当前外部联系人userId
              this.bindCunstomerUid();
            } else {
              this.$toast(response.msg);
            }
          }).catch(err => {
            console.log("contactsUid::err", err);
          });
        }else {
          console.log('wx.getCurExternalChat::res',res);
          //错误处理
        }
      });
    },
    toDetail(){
      this.$router.push(this.fun.getUrl("wechat_sidebarDetailed"));
    },
    // 发送外部联系人id
    getCustomerInfo(userId) {
      console.log(this.agentData);
      $http.get("plugin.wechat-chat-sidebar.frontend.controller.index.get-customer-info", { user_id: userId,crop_id:this.cropId, ...this.getConfig }, "获取联系人...").then(response => {
        if(response.data&&response.data.need_bind){
          this.userId = userId;
          this.need_bind = response.data.need_bind;
          this.bindCunstomerUid();
          return;
        }

        if (response.result === 1) {
          this.getUserData();
          this.getTagData(this.query);
          this.getTagGroup(); //标签组
        } else {
          this.$toast(response.msg);
        }
      })
        .catch(err => {
          console.log("getCustomerInfo::err", err);
        });
    },
    getUserData () {
      $http.get(this.userDataUrl, {crop_id:this.cropId,member_id:this.memberId || '',...this.getConfig}, "loading").then(res => {
        if (res.result === 1) {
          if (res.data.member && res.data.member.hasAuth == 0) {
            this.$dialog.alert({ message: "暂无权限" })
              .then(() => {
                this.$router.push(this.fun.getUrl("member"));
              });
          }
          if(res.data.nav_list && res.data.nav_list.length){
            let nav_list = res.data.nav_list;
            nav_list.forEach((ele,ind) => {
              if(ele.is_show){
                this.tabList = this.tabList.concat(ele.name)
              }
            });
          }
          this.showChild = true;
          this.tags = res.data.member.tag;
          this.memberInfo = res.data.member;
          this.income_statistic = res.data.statistics;
          this.tagsHeight();
        } else {
          this.$toast(res.msg);
        }
      }).catch(err => {
        console.log('getUserData::err',err);
      });
    },
    tagsHeight() {
      this.$nextTick(() => {
        setTimeout(() => {
          let tagHeight =  this.$refs.tagList.offsetHeight;
          if(tagHeight >=145) {
            this.tagsMore = true;
          } else {
            this.tagsMore = false;
          }
        },300);
      })
    },
    bindCunstomerUid(){
      // 弹出弹窗，让客户绑定一个外部联系人
      this.bindCunstomerUidPop = true;
      this.$nextTick(() => {
        let el = this.$refs['popup-customer-list'];
        el.addEventListener("scroll", this.gethandleScroll);
      });
    },
    tagsMoreOn() {
      this.tagsClass = !this.tagsClass;
    },
    // 获取标签选择列表
    getTagData(json) {
      $http.get('plugin.wechat-chat-sidebar.frontend.controller.customer.customer.get-tag', {...json,...this.getConfig})
        .then(res => {
          if (res.result === 1) {
            let data = res.data;
            this.total_page = data.last_page;
            this.query.page = data.current_page;
            if (!this.total_page) {
              this.query.page = 0;
            }
            if(this.query.page==1) {
              this.actions=data.data;
            } else {
              this.actions=this.actions.concat(data.data);
            }
            if(data.current_page==data.last_page){
              this.labelObj.isLoadMore = false;
            } else {
              this.labelObj.isLoadMore = true;
            }
            this.$nextTick(()=> {
              this.tagDebounce();
              this.addtagDebounce();
            })
          } else {
            this.$toast(res.msg);
          }
        });
    },
    groupChange(data) {
      this.query.group_name = data;
      this.query.page = 1;
      if (this.timer) clearTimeout(this.timer);
      this.timer = setTimeout(() => {
        this.debounce(this.getTagData(this.query));
      }, 500);
    },
    _initScrollClassify() {
      this.$nextTick(() => {
        let labelPopup = this.$refs.labelPopup;
        if (!this.classifyScroll) {
          this.classifyScroll = new BScroll(labelPopup.$refs.groupTag, {
            click: true,
            scrollY: true,
            probeType: 3,
            swipeBounceTime: 500,
            useTransition: false,
            mouseWheel: true
          });
          let classifyMore = document.getElementById("classifyMore");
          
          this.classifyScroll.on("scroll", pos => {
            if (classifyMore.offsetTop > labelPopup.$refs.groupTag.offsetHeight && classifyMore.offsetTop + pos.y < labelPopup.$refs.groupTag.offsetHeight && this.labelObj.tagIsLoadMore) {
              this.groupScroll();
              setTimeout(() => {
                this.classifyScroll.refresh();
              }, 800);
            }
          });
        } else {
          this.classifyScroll.refresh() // 让滚动条刷新一下: 重新统计内容的高度
        }
      });
    },
    groupDebounce() {
      // clearTimeout方法，以便控制连续触发带来的无用调用
      if (this.classifyTimer) {
        clearTimeout(this.classifyTimer); // 先清除之前的延时，并在下面重新开始计算时间
      }
      this.classifyTimer = setTimeout(() => {
        // 800毫秒以后执行方法
        this._initScrollClassify();
      }, 800); // 如果还没有执行就又被触发，会根据上面的clearTimeout来清除并重新开始计算
    },
    tagDebounce() {
      // clearTimeout方法，以便控制连续触发带来的无用调用
        if (this.debounce_timer) {
          clearTimeout(this.debounce_timer); // 先清除之前的延时，并在下面重新开始计算时间
        }
        this.debounce_timer = setTimeout(() => {
          // 800毫秒以后执行方法
          this._initScrollList();
        }, 800); // 如果还没有执行就又被触发，会根据上面的clearTimeout来清除并重新开始计算
    },
    _initScrollList() {
      let labelPopup = this.$refs.labelPopup;
      if (!this.storeScroll) {
        this.storeScroll = new BScroll(labelPopup.$refs.handpickList, {
          click: true,
          scrollY: true,
          probeType: 3,
          swipeBounceTime: 500,
          useTransition: false,
          mouseWheel: true
        });
      } else {
        this.storeScroll.refresh() // 让滚动条刷新一下: 重新统计内容的高度
      }
      let loadMore = document.getElementById("loadMore");
      this.storeScroll.on("scroll", pos => {
        if (loadMore.offsetTop > labelPopup.$refs.handpickList.offsetHeight && loadMore.offsetTop + pos.y < labelPopup.$refs.handpickList.offsetHeight && this.labelObj.isLoadMore) {
          this.dividendScroll();
          console.log("分类加载更多");
          setTimeout(() => {
            this.storeScroll.refresh();
          }, 800);
        }
      });
    },
    openedOn() {
      this.$nextTick(() => {
        setTimeout(() => {
          if(this.actions.length > 0) {
            this.storeScroll.refresh();
          }
          if(this.groupList.length > 1) {
            this.classifyScroll.refresh();
          }
        },200)
      });
    },
    addOpened() {
      this.$nextTick(() => {
        setTimeout(() => {
          if(this.actions.length > 1) {
            this.addTagScroll.refresh();
          }
        },200)
      });
    },
    addtagDebounce() {
      // clearTimeout方法，以便控制连续触发带来的无用调用
        if (this.addtag_timer) {
          clearTimeout(this.addtag_timer); // 先清除之前的延时，并在下面重新开始计算时间
        }
        this.addtag_timer = setTimeout(() => {
          // 800毫秒以后执行方法
          this._initAddScroll();
        }, 800); // 如果还没有执行就又被触发，会根据上面的clearTimeout来清除并重新开始计算
    },
    _initAddScroll() {
      let addTagRef = this.$refs.addLabel;
      if (!this.addTagScroll) {
        this.addTagScroll = new BScroll(addTagRef.$refs.groupTagList, {
          click: true,
          scrollY: true,
          probeType: 3,
          swipeBounceTime: 500,
          useTransition: false,
          mouseWheel: true
        });
      } else {
        this.addTagScroll.refresh() // 让滚动条刷新一下: 重新统计内容的高度
      }
      let addLoadMore = document.getElementById("addLoadMore");
      this.addTagScroll.on("scroll", pos => {
        if (addLoadMore.offsetTop > addTagRef.$refs.groupTagList.offsetHeight && addLoadMore.offsetTop + pos.y < addTagRef.$refs.groupTagList.offsetHeight && this.labelObj.isLoadMore) {
          this.groupScroll();
          setTimeout(() => {
            this.addTagScroll.refresh();
          }, 800);
        }
      });
    },
    async groupScroll() {
      if(this.tagPage>=this.tagTotal_page){
        return;
      }
      if(this.labelObj.tagIsLoadMore){
        this.labelObj.tagIsLoadMore= false;
        this.tagPage += 1;
        this.getTagGroup();
      }
      
    },
    async dividendScroll(){
      if(this.query.page>=this.total_page){
        return;
      }
      if(this.labelObj.isLoadMore){
        this.labelObj.isLoadMore= false;
        this.query.page += 1;
        this.getTagData(this.query);
      }
    },
    getTagGroup() {
      $http.post('plugin.wechat-chat-sidebar.frontend.controller.customer.customer.get-tag-group', {page:this.tagPage,...this.getConfig})
        .then(res => {
          if (res.result === 1) {
            let data = res.data;
            let groupList = data.list.data;
            this.tagTotal_page = data.list.last_page;
            if (!this.total_page) {
              this.tagPage = 0;
            }
            if(this.tagPage==1) {
              this.groupList = groupList;
            } else {
              this.groupList = [...this.groupList, ...groupList]; //数组拼接
            }
            if(data.list.current_page==data.list.last_page){
              this.labelObj.tagIsLoadMore = false;
            } else {
              this.labelObj.tagIsLoadMore = true;
            }
            this.$nextTick(() => {
              this.groupDebounce(); //分类标签组显示
            });
          } else {
            this.$toast(res.msg);
          }
        });
    },
    classifyOn(item) { //选择标签组
      let data = item.item;
      this.query.group_id = data.group_id || '';
      this.query.page = 1;
      this.getTagData(this.query);
    },
    tabsClick(item) {
      this.selectTags(item.item);
    },
    addConfirmOn(obj) { //添加标签
      let {tagKeyWord,index,groupId} = obj;
      // let groupId = groupList[index].group_id;
      // this.query.group_id = groupId;
      this.addTagText = tagKeyWord
      let json = {
        name:tagKeyWord,
        groupId:groupId
      }
      this.addTagPop = false;
      this.confirmAdd(json);
    },
    // 选择标签
    selectTags (detail) {
      let json = { tag_ids: detail.id, status: 1 };
      if (this.tags.some(item => item.tag_id == json.tag_ids)) {
        this.$dialog.alert({message:"已添加该标签"});
        return false;
      }
      $http.get('plugin.wechat-chat-sidebar.frontend.controller.customer.customer.manage-customers-tag', {...json, ...this.getConfig}, "loading")
        .then(res => {
          if(res.result === 0) return this.$toast(res.msg);
          this.countTime = 2;
          this.$dialog.alert({
            message: res.msg + '如标签数据未更新，请点击【标签】右方刷新图标手动刷新',
            confirmButtonText: `确认`,
            beforeClose: this.beforeClose
          }).then(() => {
            this.getUserData();
            this.closeSheet();
            this.query.page = 1;
            this.storeScroll.scrollTo(0, 0);
            this.getTagData(this.query);
          });
        });
    },
    closeSheet () {
      this.showAddSheet = false;
    },
    confirmClick() {
      this.addTagPop = true;
    },
    //删除标签
    deleteTag (tagId) {
      let json = { tag_ids: tagId,status: 2 };
      $http.get('plugin.wechat-chat-sidebar.frontend.controller.customer.customer.manage-customers-tag', {...json, ...this.getConfig}, "loading")
        .then(res => {
          if(res.result === 0) return this.$toast(res.msg);
          this.countTime = 2;
          this.$dialog.alert({
            message: res.msg + '如标签数据未更新，请点击【标签】右方刷新图标手动刷新',
            confirmButtonText: `确认`,
            beforeClose: this.beforeClose
          }).then(() => {
            this.getUserData();
            this.getTagData(this.query);
          });
        });
    },
    beforeClose(action, done) {
      if (action === 'confirm') {
        let _countTimer = setInterval(() => {
          this.countTime -= 1;
          if(this.countTime == 0){
            clearInterval(_countTimer);
            done();
          }
        }, 1000);
      } else {
        done();
      }
    },
    // 添加标签
    confirmAdd (json) {
      $http.post('plugin.wechat-chat-sidebar.frontend.controller.customer.customer.add-tag', json, "loading")
        .then(res => {
          this.showAddTagPop = false;
          this.addTagText = '';
          if(res.result === 0) return this.$toast(res.msg);
          this.countTime = 2;
          this.$dialog.alert({
            message: res.msg + '如标签数据未更新，请点击【标签】右方刷新图标手动刷新',
            confirmButtonText: `确认`,
            beforeClose: this.beforeClose
          }).then(() => {
            this.getUserData();
            this.getTagData(this.query);
          });
        });
    },
    selectTime () {
      $http.get(this.userDataUrl, {...this.getConfig, crop_id:this.cropId,member_id:this.memberId || '',income_statistic_type: this.income_statistic_type}, "loading").then(res => {
        if (res.result === 1) {
          this.income_statistic = res.data.statistics;
        } else {
          this.$toast(res.msg);
        }
      }).catch(err => {
        console.log(err);
      });
    },

    // 跳转至会员权益
    gotoMemberGrade() {
      if (this.isMemberGrade) {
        this.$router.push(this.fun.getUrl("MemberGradeList"));
      }
    },
    // 跳转至名片
    toCard(id) {
      if (!id) {
        Toast("该会员没有对应的名片");
        return;
      }
      this.$router.push(this.fun.getUrl("BusinessCard",{},{ mark_id: id, mark: "card" }));
    },

    // 错误日志
    errorLogHandler (logType, err) {
      $http.get('plugin.wechat-chat-sidebar.frontend.controller.index.recordErrorLog', {logType, err}, "loading")
        .then()
        .catch(err => {
          console.log(err);
        });
    },
    onInputMember(detail) {
      this.bindCunstomerUid_vaule = detail;
      // 防抖
      if (this.timer) clearTimeout(this.timer);
      this.timer = setTimeout(() => {
        this.debounce(this.memberList());
      }, 500);
    },
    debounce(fn, delay) {
      let last, deferTimer;
      return function(args) {
        let that = this;
        let _args = arguments;
        let now = +new Date();
        if (last && now < last + delay) {
          clearTimeout(deferTimer);
          deferTimer = setTimeout(function() {
            last = now;
            fn.apply(that, _args);
          }, delay);
        } else {
          last = now;
          fn.apply(that, _args);
        }
      };
    },
    async memberList(page=1) {
      let { result, msg, data } = await $http.get("plugin.wechat-chat-sidebar.frontend.controller.index.get-member-list",{keyword: this.bindCunstomerUid_vaule,page},".");
      this.scroll_is_load_more = true;
      if (result == 0) return this.$toast(msg);
      if(data){
        this.member_current_page = data.current_page;
        this.member_last_page = data.last_page;
        this.bindCunstomerUid_list = page==1?data.data:this.bindCunstomerUid_list.concat(data.data||[]);
      }
    },
    selectUId(item){
      this.activeUidInfo = item;
      this.bindCunstomerUid_list = [];
    },
    async bindGroupUid(){
      if(!this.activeUidInfo.uid) return this.$toast('请选择会员绑定！');
      let url = 'plugin.wechat-chat-sidebar.frontend.controller.index.bind-external-contacts';
      let json = { chat_id: this.chatId, external_contacts_uid: this.activeUidInfo.uid }
      if(this.need_bind){
        url = 'plugin.wechat-chat-sidebar.frontend.controller.member.bind.index'
        json = {member_id:this.activeUidInfo.uid,user_id:this.userId};
      }
      let { result, msg } = await $http.get(url,json,".");
      if (result == 0) return this.$toast(msg);
      window.location.reload();
      // this.getCustomerInfo(this.activeUidInfo.uid); //获取当前外部联系人
    },
    gethandleScroll() {
      let el = this.$refs['popup-customer-list'],
        scrollTop = el.scrollTop,
        clientHeight = el.clientHeight,
        scrollHeight = el.scrollHeight;
      if (scrollTop + clientHeight + 105 > scrollHeight&&this.scroll_is_load_more) {
        this.scroll_is_load_more = false;
        if (this.member_current_page >= this.member_last_page) {
          return false;
        }
        let page = this.member_current_page+1;
        this.memberList(page);
      }
      
    },
  },
  mounted() {
  },
  deactivated() {
    if (this.$refs['popup-customer-list']) {
      this.$refs['popup-customer-list'].removeEventListener("scroll", this.gethandleScroll);
    }
  },

  components: {
    // cFoot,
    userInfo,
    myCustomer,
    orderList,
    revenueDetails,
    myCart,
    goodsCoupon,
    myFavorite,
    browseRecord,
    labelPop,
    addLabelPop,
    cultivateCourse,
    carManage
  },
};
